﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace Team6_Algorithms.AidingClasses
{
    /// <summary>
    /// The blob class to be used for the segmentation algorithm
    /// Made by Team 4, edited by Team 6
    /// </summary>
    public class Blob
    {
        public int label { get; set; }
        public int pixelInBlob { get; set; }
        public List<PixelPoint> Pixels = new List<PixelPoint>();

        // the X and Y corner positions of the blob itself
        public int topLeftX = 0, topRightX = 0, bottomLeftX = 0, bottomRightX = 0;
        public int topLeftY = 0, topRightY = 0, bottomLeftY = 0, bottomRightY = 0;

        //the corner positions of the blob
        //This is the coordinates of the bounding box shown in the GUI
        public int maxx = 0, maxy = 0, minx = 0, miny = 0;

        //amount of BLOB pixels
        public int amountOfPixels = 0;

        //by martijn koopman
        public override string ToString()
        {
            string str = "Blob: label = " + label + "; pixels = " + amountOfPixels + "\n";
            str += "(" + topLeftX + ", " + topLeftY + ") (" + topRightX + ", " + topRightY + ")\n";
            str += "(" + bottomLeftX + ", " + bottomLeftY + ") (" + bottomRightX + ", " + bottomRightY + ")\n";

            return str;
        }

    }
}
